a = '\t'.join(map(str, range(10)))
print(a)  # 0	1	2	3	4	5	6	7	8	9
print(a.find('1'))  # 2
print(a.index('\t'))  # 1

print(a.find('\n'))  # -1
print(a.index('\n'))  # ValueError: substring not found
